<template>
  <div>
    <table>
      <thead>
        <tr>
          <th>ID</th>
          <th>Name</th>
          <th>Emali</th>
        </tr>
      </thead>
      <tbody>
        <tr v-for="item in porps.dataarr" :key="item.id">
          <td>{{ item.id }}</td>
          <td>
            <slot name="cell" :row="item">{{ item.name }}</slot>
          </td>
          <td>
            <slot name="ema" :row="item">{{ item.emali }}</slot>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script setup lang="ts">
const porps = defineProps(['dataarr'])
</script>

<style scoped>
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}
</style>
